import service from '../utils/axios'

// 判断是否有注册
export const isRegisterAPI = (data: object) => {
  return service.post('/isRegister', data)
}

// 注册
export const registerAPI = (data: object) => {
  return service.post('/register', data)
}

// 登录/signin
export const signinAPI = (data: object) => {
  return service.post('/signin', data)
}

// 获取总览数据/overview
export const overviewAPI = (data: object) => {
  return service.post('/overview', data)
}

// 获取评论/comment
export const commentAPI = (data: object) => {
  return service.post('/comment', data)
}

// 将评论转为已读/commentIsread
export const commentIsreadAPI = (data: object) => {
  return service.post('/commentIsread', data)
}

// 删除评论/deleteComment
export const deleteCommentAPI = (data: object) => {
  return service.post('/deleteComment', data)
}

// 获取私信/message
export const messageAPI = (data: object) => {
  return service.post('/message', data)
}

// 获取私信未读数/noreadMessage
export const noreadMessageAPI = (data: object) => {
  return service.post('/noreadMessage', data)
}

// 删除私信deleteMessage
export const deleteMessageAPI = (data: object) => {
  return service.post('/deleteMessage', data)
}

// 新建分组addSubset
export const addSubsetAPI = (data: object) => {
  return service.post('/addSubset', data)
}

// 获取分组subset
export const subsetAPI = (data: object) => {
  return service.post('/subset', data)
}

// 修改分组updateSubset
export const updateSubsetAPI = (data: object) => {
  return service.post('/updateSubset', data)
}

// 删除分组/deleteSubset
export const deleteSubsetAPI = (data: object) => {
  return service.post('/deleteSubset', data)
}

// 新建标签addLabel
export const addLabelAPI = (data: object) => {
  return service.post('/addLabel', data)
}

// 获取标签label
export const labelAPI = (data: object) => {
  return service.post('/label', data)
}

// 删除标签deleteLabel
export const deleteLabelAPI = (data: object) => {
  return service.post('/deleteLabel', data)
}

// 新建文章/图库createArticle
export const createArticleAPI = (data: object) => {
  return service.post('/createArticle', data)
}

// 上传文件upload
export const uploadAPI = (data: object) => {
  return service.post('/upload', data)
}

// 更新文章updateArticle
export const updateArticleAPI = (data: object) => {
  return service.post('/updateArticle', data)
}

// 获取文章/article
export const articleAPI = (data: object) => {
  return service.post('/article', data)
}

// 获取状态数articleState
export const articleStateAPI = (data: object) => {
  return service.post('/articleState', data)
}

// 文章发布/文章撤回/changeArticleState
export const changeArticleStateAPI = (data: object) => {
  return service.post('/changeArticleState', data)
}

// 删除文章/deleteArticle
export const deleteArticleAPI = (data: object) => {
  return service.post('/deleteArticle', data)
}

// 获取文章详情gainArticle
export const gainArticleAPI = (data: object) => {
  return service.post('/gainArticle', data)
}

// 删除文件deleteFile
export const deleteFileAPI = (data: object) => {
  return service.post('/deleteFile', data)
}

// 新建日记createDiary
export const createDiaryAPI = (data: object) => {
  return service.post('/createDiary', data)
}

// 获取日记/diary
export const diaryAPI = (data: object) => {
  return service.post('/diary', data)
}

// 删除日记deleteDiary
export const deleteDiaryAPI = (data: object) => {
  return service.post('/deleteDiary', data)
}

// 获取文件/file
export const fileAPI = (data: object) => {
  return service.post('/file', data)
}

//移动文件/removeFile
export const removeFileAPI = (data: object) => {
  return service.post('/removeFile', data)
}
